<?php
if ($query->num_rows() > 0) {
    $gardient = $query->row();
}

$pattern = "%d/%m/%Y";
$dob = mdate($pattern, $gardient->dob);

$image_path = './assets/avatar_gardient/thumbs/' . $gardient->avatar;
if (file_exists($image_path) && $gardient->avatar != null) {
    $image_path = base_url() . 'assets/avatar_gardient/thumbs/' . $gardient->avatar;
} else {
    $image_path = root_url('seatting-falin') . 'assets/noimage.gif';
}

$gender = $gardient->gender == 'm' ? 'Male' : 'Female';
?>
<div id="wrapper-content">

    <table class="titrepage" width="100%">
        <tr>
            <td >Information du gardien</td>
        </tr>
    </table>

<?php echo form_open(site_url('admin/detail_gardient') . '/' . $gardient->id); ?>
<table align="center" class="list" width="100%">
    <tr>
        <td width="200px"><label for="avatar"> Image </label></td>
        <td><img src="<?php echo $image_path; ?>" width="100px" alt=""/></td>
            </tr>
            <tr>
                <td><label for="first_name">Nom:</label></td>
                <td><?php echo $gardient->first_name; ?></td>
            </tr>
            <tr>
                <td><label for="last_name">Prénom:</label></td>
                <td><?php echo $gardient->last_name; ?></td>
            </tr>
            <tr>
                <td><label for="DOB">Date de naissance:</label></td>
                <td><?php echo $dob; ?></td>
            </tr>
            <tr>
                <td><label for="gender">Sexe:</label></td>
                <td><?php echo $gender; ?></td>
            </tr>
            <tr>
                <td><label for="phone">Téléphone:</label></td>
                <td><?php echo $gardient->phone; ?></td>
            </tr>
            <tr>
                <td><label for="address">Adresse:</label></td>
                <td><?php echo $gardient->address; ?></td>
            </tr>
            <tr>
                <td><label for="city">Ville:</label></td>
                <td><?php echo $gardient->city; ?></td>
            </tr>        
            <tr>
                <td><label for="email">Email:</label></td>
                <td><?php echo $gardient->email; ?></td>
            </tr>
            <tr>
                <td><label for="experience">Expérience:</label></td>
                <td><?php echo $gardient->experience; ?></td>
            </tr>
        </table>
<?php echo form_close(); ?>
</div>